// Source File Name:   SourceFile

package com.sgame.android.network;

import java.io.UnsupportedEncodingException;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.message.BasicNameValuePair;

public final class StringNameValueMap
{

    public StringNameValueMap()
    {
        mMap = new ConcurrentHashMap<String, String>();
    }

    public final void Add(String s, String s1)
    {
        mMap.put(s, s1);
    }

    public final UrlEncodedFormEntity getValues()
        throws UnsupportedEncodingException
    {
        ArrayList<BasicNameValuePair> arraylist = new ArrayList<BasicNameValuePair>();
        java.util.Map.Entry<String,String> entry;
        for(Iterator<Entry<String, String>> iterator = mMap.entrySet().iterator(); iterator.hasNext(); arraylist.add(new BasicNameValuePair((String)entry.getKey(), (String)entry.getValue())))
            entry = (java.util.Map.Entry<String,String>)iterator.next();

        UrlEncodedFormEntity urlencodedformentity;
        (urlencodedformentity = new UrlEncodedFormEntity(arraylist, "UTF-8")).setContentEncoding("UTF-8");
        return urlencodedformentity;
    }

    private ConcurrentHashMap<String, String> mMap;
}
